﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Marmat.Foundation
{
    public interface ICache
    {
        /// <summary>
        /// 设置缓存。
        /// </summary>
        /// <param name="key">缓存的key值。</param>
        /// <param name="value">缓存的内容。</param>
        void SetValue(object key, object value);

        /// <summary>
        ///  获取指定键值的缓存。
        /// </summary>
        /// <param name="key">缓存的key值。</param>
        /// <returns></returns>
        object GetValue(object key);

        /// <summary>
        /// 返回是否存在指键值的缓存。
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        bool ContainsKey(object key);
    }
}
